import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../widget/my_image.dart';
class HomeActivity extends StatefulWidget {
  HomeActivity({this.homeActivity});
  final List<dynamic> homeActivity;
  @override
  _HomeActivityState createState() => _HomeActivityState();
}

class _HomeActivityState extends State<HomeActivity> {

  @override
  Widget build(BuildContext context) {
    return Container(
      width:750.w,
      color: Colors.white,
      alignment: Alignment.center,
      child:Container(
        width:700.w,
        child: Row(
          mainAxisSize: MainAxisSize.max,
          children: [
            Container(
              width:250.w,
              height:300.w,
              decoration:BoxDecoration(
                  boxShadow: [
                    BoxShadow(
                        offset:Offset(0, 0),
                        color:Colors.grey
                    )
                  ],
                  borderRadius: BorderRadius.all(Radius.circular(5)),
                  image:DecorationImage(
                    fit: BoxFit.cover,
                    image: NetworkImage(widget.homeActivity[0]['pic']),
                  )
              ),
              child: Stack(
                children: [
                  Positioned(
                    top:20.h,
                    left:20.h,
                    child: Text(widget.homeActivity[0]['title'],style: TextStyle(
                      color:Colors.white,
                      fontSize: 40.sp
                    ),),
                  ),
                  Positioned(
                    top:80.h,
                    left:20.h,
                    child: Text(widget.homeActivity[0]['info'],style: TextStyle(
                        color:Colors.white,
                        fontSize: 25.sp
                    ),),
                  ),
                ],
              ),
            ),
            SizedBox(
              width: 50.w,
            ),
            Column(
              children: [
                Container(
                    width:400.w,
                    height:135.w,
                    decoration:BoxDecoration(
                        boxShadow: [
                          BoxShadow(
                              offset:Offset(0, 0),
                              color:Colors.grey
                          )
                        ],
                        borderRadius: BorderRadius.all(Radius.circular(5)),
                        image:DecorationImage(
                          fit: BoxFit.cover,
                          image: NetworkImage(widget.homeActivity[1]['pic']),
                        )
                    ),
                  child: Stack(
                    children: [
                      Positioned(
                        top:20.h,
                        left:20.h,
                        child: Text(widget.homeActivity[1]['title'],style: TextStyle(
                            color:Colors.white,
                            fontSize: 40.sp
                        ),),
                      ),
                      Positioned(
                        top:80.h,
                        left:20.h,
                        child: Text(widget.homeActivity[1]['info'],style: TextStyle(
                            color:Colors.white,
                            fontSize: 25.sp
                        ),),
                      ),
                    ],
                  ),
                ),
                SizedBox(
                  height: 30.w,
                ),
                Container(
                    width:400.w,
                    height:135.w,
                    decoration:BoxDecoration(
                        boxShadow: [
                          BoxShadow(
                              offset:Offset(0, 0),
                              color:Colors.grey
                          )
                        ],
                        borderRadius: BorderRadius.all(Radius.circular(5)),
                        image:DecorationImage(
                          fit: BoxFit.cover,
                          image: NetworkImage(widget.homeActivity[2]['pic']),
                        )
                    ),
                  child: Stack(
                    children: [
                      Positioned(
                        top:20.h,
                        left:20.h,
                        child: Text(widget.homeActivity[2]['title'],style: TextStyle(
                            color:Colors.white,
                            fontSize: 40.sp
                        ),),
                      ),
                      Positioned(
                        top:80.h,
                        left:20.h,
                        child: Text(widget.homeActivity[2]['info'],style: TextStyle(
                            color:Colors.white,
                            fontSize: 25.sp
                        ),),
                      ),
                    ],
                  ),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
